package Book;

/**
 *
 */
public class BookList {
     private book[] books = new book[10];
     private int booksnum;


  /* public book setbooks( int pos){
       return books[pos];
   } */

    public BookList(){
        books[0] = new book("三国演义","罗贯中",89,"小说");
        books[1] = new book("西游记","吴承恩",78,"小说");
        books[2] = new book("红楼梦","曹雪芹",49,"小说");
        this.booksnum = 3;
    }
   public book getbook( int pos){
       return books[pos];
   }

   public void setBooks(book book){
        this.books[booksnum] = book;
   }
   public void setBooks(int pos,book book){
        this.books[pos] = book;
   }

    public int getBooksnum() {
        return booksnum;
    }

    public void setBooksnum(int booksnum) {
        this.booksnum = booksnum;
    }
}
